<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 主轴对齐方式给父盒子设置 */
        div {
            /* 必须要写flex布局 */
            display: flex;
            height: 300px;
            /* 终点到起点一次排开 */
            /* justify-content: flex-end; */
            /* 每个子盒子左右又间距 */
            justify-content: space-around;
            /* 两边弹性盒子贴边了，中间盒子平均分配剩余空间 */
            justify-content: space-between;
            /* 每两个弹性盒子间距相等 */
            justify-content: space-evenly;
            background-color: pink;
        }

        div span {
            width: 50px;
            height: 50px;
            background-color: gray;
        }
    </style>
</head>

<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
        <span>5</span>
        <span>6</span>
    </div>
</body>

</html>